---@diagnostic disable: lowercase-global, undefined-global, trailing-space

GLOBAL.setmetatable(env,{__index=function(t,k) return GLOBAL.rawget(GLOBAL,k) end})

---@type string
local modid = 'avatar_bh_mobius' -- 定义唯一modid

---@type LAN_TOOL_COORDS
C_BH_MOBIUS = require('core_'..modid..'/utils/coords')
---@type LAN_TOOL_SUGARS
S_BH_MOBIUS = require('core_'..modid..'/utils/sugar')

rawset(GLOBAL,'C_BH_MOBIUS',C_BH_MOBIUS)
rawset(GLOBAL,'S_BH_MOBIUS',S_BH_MOBIUS)

PrefabFiles = {
	'avatar_bh_mobius_module_buffs',
	'avatar_bh_mobius_module_dishes',
	'avatar_bh_mobius_module_particle',
	'bh_mobius_candy',
	'bh_mobius_sword',

}

---@type asset[]
Assets = {

}
-- 导入常量表
modimport('scripts/core_'..modid..'/data/tuning.lua')

-- 导入工具
modimport('scripts/core_'..modid..'/utils/_register.lua')

-- 导入功能API
modimport('scripts/core_'..modid..'/api/_register.lua')

-- 导入mod配置
TUNING[string.upper('CONFIG_'..modid..'_LANG')] = GetModConfigData(modid..'_lang')

-- 导入语言文件
modimport('scripts/core_'..modid..'/languages/'..TUNING[string.upper('CONFIG_'..modid..'_LANG')]..'.lua')

-- 导入人物
modimport('scripts/data_avatar/data_avatar_bh_mobius.lua')

-- 导入调用器
modimport('scripts/core_'..modid..'/callers/caller_attackperiod.lua')
modimport('scripts/core_'..modid..'/callers/caller_badge.lua')
modimport('scripts/core_'..modid..'/callers/caller_ca.lua')
modimport('scripts/core_'..modid..'/callers/caller_changeactionsg.lua')
modimport('scripts/core_'..modid..'/callers/caller_container.lua')
modimport('scripts/core_'..modid..'/callers/caller_dish.lua')
modimport('scripts/core_'..modid..'/callers/caller_keyhandler.lua')
-- modimport('scripts/core_'..modid..'/callers/caller_onlyusedby.lua')
modimport('scripts/core_'..modid..'/callers/caller_recipes.lua')
modimport('scripts/core_'..modid..'/callers/caller_stack.lua')


-- 导入UI
modimport('scripts/core_'..modid..'/ui/lvlup.lua')

-- 注册客机组件
AddReplicableComponent('bh_mobius_energy')
AddReplicableComponent('bh_mobius_sword_lvlup')
AddReplicableComponent('bh_mobius_lv')

-- 导入钩子
---@type string[]
local files_hook = {
	'bh_mobius_energy',
	'bh_mobius_sword_lvlup',
	'bh_mobius_sword_leap',
	'bh_mobius_sword_container',
	'bh_mobius_lv'
}
for _,v in ipairs(files_hook) do
	modimport('scripts/core_'..modid..'/hooks/'..v..'.lua')
end

-- sg
modimport('scripts/core_'..modid..'/sg/leapatk.lua')